package com.mspersonalized.circumscribedAPI.controller;

import com.mspersonalized.circumscribedAPI.service.AlyRlthService;
import com.mspersonalized.circumscribedAPI.service.AlyRxfgService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/alyapi")
public class AlyController {
    @Resource
    private AlyRxfgService alyRxfgService;

    @Resource
    private AlyRlthService alyRlthService;

    @PostMapping("/rxfg")
    public String rxfg(@RequestParam MultipartFile file, @RequestParam String type){
        return alyRxfgService.rxfg(file);
    }

    @PostMapping("/rlth")
    public void rlth(@RequestParam MultipartFile fileOld, @RequestParam MultipartFile fileNew,@RequestParam String type,@RequestParam String effect){
        alyRlthService.rlth(fileOld, fileNew);
    }
}
